package com.example.controller.product;

import com.example.pojo.Node;

import com.example.service.product.PriductCategroyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @program: demo
 * @description: 商品分类表
 * @author: yc
 * @create: 2022-11-12 16:53
 **/
@Controller
@RequestMapping("/ProductList")
public class PriductCategroyController {

    @Autowired
    private PriductCategroyService priductCategroyService;

    /**
     * @Description: getProductList商品分类列表
     * @Param:
     * @return: java.util.List<com.example.pojo.Node>
     * @Author: yc
     * @Date: 2022/11/12 16:42
     */
    @CrossOrigin
    @ResponseBody
    @RequestMapping("/getProductList")
    public List<Node> getPriductCategroy(){
        List<Node> productList = priductCategroyService.getPriductCategroy();
        return productList;
    }

}
